package com.jprocms.module.cms.convert.operate;

import com.jpro.framework.common.pojo.PageResult;
import com.jprocms.module.cms.controller.portal.vo.OperateCreateReqVO;
import com.jprocms.module.cms.controller.portal.vo.OperateQueryReqVO;
import com.jprocms.module.cms.controller.portal.vo.OperateRespVO;
import com.jprocms.module.cms.dal.dataobject.operate.OperateDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 操作记录 Convert
 *
 * @author JPROCMS
 */
@Mapper
public interface OperateConvert {

    OperateConvert INSTANCE = Mappers.getMapper(OperateConvert.class);

    OperateDO convert(OperateCreateReqVO bean);

    OperateCreateReqVO convert(OperateQueryReqVO bean);

    OperateRespVO convert(OperateDO bean);

    List<OperateRespVO> convertList(List<OperateDO> list);

    PageResult<OperateRespVO> convertPage(PageResult<OperateDO> page);

}
